get size files in laravel

51

get size files in laravel -

Laravel 5^
  
  $request->file('file')->getSize();

Laravel 4
  
  $request->file('file')->getClientSize(); // getClientSize() is deprecated in Laravel 5

how to get the size of an uploaded file in laravel -

use Illuminate\Support\Facades\Storage;

$size = Storage::size('public/'.$picture->filename');

Comments

Submit
0 Comments